package cn.itcast.order.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class YourService {
    @Autowired
    private RedisService redisService;

    @PostMapping("a")
    public String a() {
        redisService.setValue("name", "laodanhong");
        return "success";
    }
    @PostMapping("b")
    public String b() {
        return redisService.getValue("name");
    }
}
